home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / language / fixes.arc / OSBIND.H < prev    next >
C/C++ Source or Header  |  1989-05-07  |  5KB  |  129 lines

  1. /*
  2.  *    OSBIND.H    Mnemonic names for operating system calls
  3.  */
  4.  
  5. #ifndef    OSBIND_H
  6. #define    OSBIND_H
  7.  
  8. extern    long    gemdos();
  9. extern    long    bios();
  10. extern    long    xbios();
  11. extern    int    bdos();
  12.  
  13. /*    
  14.  *    GEMDOS    (trap1)
  15.  */
  16. #define    Pterm0()            gemdos(0x00)
  17. #define    Cconin()            gemdos(0x01)
  18. #define    Cconout(c)            gemdos(0x02,c)
  19. #define    Cauxin()            gemdos(0x03)
  20. #define    Cauxout(c)            gemdos(0x04,c)
  21. #define    Cprnout(c)            gemdos(0x05,c)
  22. #define    Crawio(data)            gemdos(0x06,data)
  23. #define    Crawcin()            gemdos(0x07)
  24. #define    Cnecin()            gemdos(0x08)
  25. #define    Cconws(s)            gemdos(0x09,s)
  26. #define    Cconrs(buf)            gemdos(0x0A,buf)
  27. #define    Cconis()            (int)gemdos(0x0B)
  28. #define    Dsetdrv(d)            gemdos(0x0E,d)
  29. #define    Cconos()            gemdos(0x10)
  30. #define    Cprnos()            gemdos(0x11)
  31. #define    Cauxis()            gemdos(0x12)
  32. #define    Cauxos()            gemdos(0x13)
  33. #define    Dgetdrv()            (int)gemdos(0x19)
  34. #define    Fsetdta(dta)            gemdos(0x1A,dta)
  35. #define    Super(ptr)            gemdos(0x20,ptr)
  36. #define    Tgetdate()            (int)gemdos(0x2A)
  37. #define    Tsetdate(date)            gemdos(0x2B,date)
  38. #define    Tgettime()            (int)gemdos(0x2C)
  39. #define    Tsettime(time)            gemdos(0x2D,time)
  40. #define    Fgetdta()            gemdos(0x2F)
  41. #define    Sversion()            (int)gemdos(0x30)
  42. #define    Ptermres(save,rv)        gemdos(0x31,save,rv)
  43. #define    Dfree(buf,d)            gemdos(0x36,buf,d)
  44. #define    Dcreate(path)            gemdos(0x39,path)
  45. #define    Ddelete(path)            gemdos(0x3A,path)
  46. #define    Dsetpath(path)            gemdos(0x3B,path)
  47. #define    Fcreate(fn,mode)        gemdos(0x3C,fn,mode)
  48. #define    Fopen(fn,mode)            gemdos(0x3D,fn,mode)
  49. #define    Fclose(h)            gemdos(0x3E,h)
  50. #define    Fread(h,cnt,buf)        gemdos(0x3F,h,cnt,buf)
  51. #define    Fwrite(h,cnt,buf)        gemdos(0x40,h,cnt,buf)
  52. #define    Fdelete(fn)            gemdos(0x41,fn)
  53. #define    Fseek(where,h,how)        gemdos(0x42,where,h,how)
  54. #define    Fattrib(fn,rwflag,attr)        gemdos(0x43,fn,rwflag,attr)
  55. #define    Fdup(h)                gemdos(0x45,h)
  56. #define    Fforce(hstd,hnew)        gemdos(0x46,hstd,hnew)
  57. #define    Dgetpath(buf,d)            gemdos(0x47,buf,d)
  58. #define    Malloc(size)            gemdos(0x48,size)
  59. #define    Mfree(ptr)            gemdos(0x49,ptr)
  60. #define    Mshrink(ptr,size)        gemdos(0x4A,0,ptr,size)
  61. #define    Pexec(mode,prog,tail,env)    gemdos(0x4B,mode,prog,tail,env)
  62. #define    Pterm(rv)            gemdos(0x4C,rv)
  63. #define    Fsfirst(filespec,attr)        (int)gemdos(0x4E,filespec,attr)
  64. #define    Fsnext()            (int)gemdos(0x4F)
  65. #define    Frename(zero,old,new)        gemdos(0x56,zero,old,new)
  66. #define    Fdatime(timeptr,h,rwflag)    gemdos(0x57,timeptr,h,rwflag)
  67.  
  68. /*
  69.  *    BIOS    (trap13)
  70.  */
  71. #define    Bconstat(dev)            bios(1,dev)
  72. #define    Bconin(dev)            bios(2,dev)
  73. #define    Bconout(dev,c)            bios(3,dev,c)
  74. #define    Rwabs(rwflag,buf,n,sector,d)    bios(4,rwflag,buf,n,sector,d)
  75. #define    Setexc(vnum,vptr)        bios(5,vnum,vptr)
  76. #define    Tickcal()            bios(6)
  77. #define    Getbpb(d)            bios(7,d)
  78. #define    Bcostat(dev)            bios(8,dev)
  79. #define    Mediach(d)            bios(9,a)
  80. #define    Drvmap()            bios(10)
  81. #define    Getshift()            bios(11,-1)
  82. #define    Kbshift(data)            bios(11,data)
  83.  
  84. /*
  85.  *    XBIOS    (trap14)
  86.  */
  87. #define    Initmous(type,param,vptr)    xbios(0,type,param,vptr)
  88. #define    Physbase()            xbios(2)
  89. #define    Logbase()            xbios(3)
  90. #define    Getrez()            (int)xbios(4)
  91. #define    Setscreen(lscrn,pscrn,rez)    xbios(5,lscrn,pscrn,rez)
  92. #define    Setpallete(palptr)        xbios(6,palptr)
  93. #define    Setcolor(colornum,mixture)    xbios(7,colornum,mixture)
  94. #define    Floprd(buf,x,d,sect,trk,side,n)    xbios(8,buf,x,d,sect,trk,side,n)
  95. #define    Flopwr(buf,x,d,sect,trk,side,n)    xbios(9,buf,x,d,sect,trk,side,n)
  96. #define    Flopfmt(b,x,d,spt,trk,sd,i,m,v)    xbios(10,b,x,d,spt,trk,sd,i,m,v)
  97. #define    Midiws(cnt,ptr)            xbios(12,cnt,ptr)
  98. #define    Mfpint(vnum,vptr)        xbios(13,vnum,vptr)
  99. #define    Iorec(iodev)            xbios(14,iodev)
  100. #define    Rsconf(baud,flow,uc,rs,ts,sc)    xbios(15,baud,flow,uc,rs,ts,sc)
  101. #define    Keytbl(nrml,shft,caps)        xbios(16,nrml,shft,caps)
  102. #define    Random()            xbios(17)
  103. #define    Protobt(buf,serial,dsktyp,exec)    xbios(18,buf,serial,dsktyp,exec)
  104. #define    Flopver(buf,x,d,sect,trk,sd,n)    xbios(19,buf,x,d,sect,trk,sd,n)
  105. #define    Scrdmp()            xbios(20)
  106. #define    Cursconf(func,rate)        xbios(21,func,rate)
  107. #define    Settime(time)            xbios(22,time)
  108. #define    Gettime()            xbios(23)
  109. #define    Bioskeys()            xbios(24)
  110. #define    Ikbdws(len_minus1,ptr)        xbios(25,len_minus1,ptr)
  111. #define    Jdisint(vnum)            xbios(26,vnum)
  112. #define    Jenabint(vnum)            xbios(27,vnum)
  113. #define    Giaccess(data,reg)        xbios(28,data,reg)
  114. #define    Offgibit(ormask)        xbios(29,ormask)
  115. #define    Ongibit(andmask)        xbios(30,andmask)
  116. #define    Xbtimer(timer,ctrl,data,vnum)    xbios(31,timer,ctrl,data,vnum)
  117. #define    Dosound(ptr)            xbios(32,ptr)
  118. #define    Setprt(config)            xbios(33,config)
  119. #define    Kbdvbase()            xbios(34)
  120. #define    Kbrate(delay,reprate)        xbios(35,delay,reprate)
  121. #define    Prtblk(pblkptr)            xbios(36,pblkptr)
  122. #define    Vsync()                xbios(37)
  123. #define    Supexec(funcptr)        xbios(38,funcptr)
  124.  
  125. /* the following calls are undocumented */
  126. #define    Steprate(drive,rate)        xbios(41,drive,rate)
  127.  
  128. #endif    OSBIND_H
  129.